﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="iDefault.aspx.cs" Inherits="Newsell.iDefault" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="style/css/transdmin.css" rel="stylesheet" type="text/css" media="screen" />
    <!--[if IE 6]><link rel="stylesheet" type="text/css" media="screen" href="style/css/ie6.css" /><![endif]-->
    <!--[if IE 7]><link rel="stylesheet" type="text/css" media="screen" href="style/css/ie7.css" /><![endif]-->
    <link href="Layout/zTreeStyle/zTreeStyle.css" rel="stylesheet" type="text/css" />
    <link href="style/comon.css" rel="stylesheet" type="text/css" />
    <link href="style/saleList.css" rel="stylesheet" type="text/css" />

    <script src="Scripts/jquery.js" type="text/javascript"></script>
    <script src="Layout/jquery.ztree-2.6.min.js" type="text/javascript"></script>
    <script src="Scripts/jquery.loadthumb.js" type="text/javascript"></script>
    <script src="Scripts/comon.js" type="text/javascript"></script>
    <script src="Scripts/iDefault.js" type="text/javascript"></script>
    <script type="text/javascript" language="javascript">
        function showProcess(obj) {
            $("div.Process").css({ "top": $(obj).offset().top, "left": $(obj).offset().left - 32 });
            $("div.Process").show();
        }
        function hideProcess() {
            $("div.Process").hide();
        }
    </script>
</head>
<body>
    <form id="frm_iDefault" runat="server">
    <input type="hidden" id="hID" name="hName" />
    <input type="hidden" id="hnid" name="hNid" />
    <input type="hidden" id="hCid" name="hCid" />
    <asp:ScriptManager ID="ScriptManager_iDefault" runat="server"></asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel_iDefault" runat="server"><ContentTemplate>
        <div class="Process hidden"></div>
        <div id="salegoodcont" class="clr">
            <h4>请选择您要发布的商品！</h4>
            <div id="sgcLeft" class="">
                <div class="onsellTitle"><span style="display:block; text-align:center; margin:0 auto; font-size:13px;">店铺商品类目</span></div>
                <ul id="tree" class="tree"></ul>
            </div>
            <div id="sgcRight" class="">
                    <asp:Repeater ID="RepGoodList" runat="server" 
                        onitemcommand="RepGoodList_ItemCommand" onitemcreated="RepGoodList_ItemCreated">
                        <ItemTemplate>
                        <div id="goodlistCont" class="">
                            <div class="onsellShow">
                                <div class="onsellTitle">
                                    <h3>
                                        <asp:Label ID="LabTitle" runat="server" Text='<%# Eval("Title").ToString().Length > 20 ? Eval("Title").ToString().Substring(0, 20) + "..." : Eval("Title").ToString() %>'></asp:Label></h3>
                                        <div>
                                            <asp:LinkButton ID="selgoodCommit" OnClientClick='showProcess(this)' runat="server" CommandName="insert" CommandArgument='<%# Eval("NumIid") %>'>发布这个商品</asp:LinkButton>
                                        </div>
                                </div>
                             </div>
                            <div class="onsellDetail clr">
                                <div id="imgField" class="imgField" >
                                    <asp:Image ID="imgImgurl" CssClass="imgcss" runat="server" ImageUrl='<%# Eval("PicUrl") %>' />
                                    </div>
                                <div class="disCount">
                                    <div class="disInfo">
                                    <label class="disMsg">此商品还未设置打折信息</label>
                                    <a runat="server" ID="disOF" class="disOnOff" onclick='SetPromotion(this)'>设置优惠</a>
                                        <asp:HiddenField ID="setPromo" runat="server" Value="0" />
                                    </div>
                                    <div class="disDetail hidden"><div>
                                        <asp:DropDownList ID="disType" CssClass="disType" runat="server" 
                                            EnableTheming="False" ToolTip="优惠方式" AutoPostBack="False">
                                            <asp:ListItem Value="DISCOUNT">折扣：</asp:ListItem>
                                            <asp:ListItem Value="PRICE">优惠价：</asp:ListItem>
                                        </asp:DropDownList>
                                            <asp:DropDownList ID="disValue2" CssClass="disValue" runat="server">
                                            </asp:DropDownList>
                                        <asp:TextBox ID="disValue" CssClass="disValue hidden" runat="server" Text="请输入优惠价格！" 
                                                EnableTheming="False" MaxLength="8" TextMode="SingleLine" 
                                            Wrap="False" ToolTip="折扣率，打折请输入X.X，优惠价请直接输入价格" Width="100px" onfocus="if(this.value=='请输入优惠价格！'){this.value='';}" onKeyPress="if((event.keyCode<48 || event.keyCode>57) && event.keyCode!=46 || /\.\d\d$/.test(value))event.returnValue=false" ></asp:TextBox>
                                        <asp:DropDownList ID="disData" CssClass="disData" runat="server" 
                                            EnableTheming="False" ToolTip="优惠时间">
                                            <asp:ListItem Value="6">6小时</asp:ListItem>
                                            <asp:ListItem Value="12">12小时</asp:ListItem>
                                            <asp:ListItem Value="18">18小时</asp:ListItem>
                                            <asp:ListItem Value="24">24小时</asp:ListItem>
                                        </asp:DropDownList></div>
                                        <a class="disCommit" onclick="return false;">确定</a>
                                    </div>
                                </div>
                                <div class="textField">
                                    <asp:Label ID="lablePrice" runat="server" Text='<%#  "<strong class=pricearea>" + Eval("Price") + "</strong>" %>'></asp:Label>
                                    <asp:Label ID="lableNum" runat="server" Text='<%# "库存：" + Eval("num")%>'></asp:Label>
                                    <asp:Label ID="lableValidThru" runat="server" Text='<%# "有效期：" + Eval("ValidThru") + "天"%>'></asp:Label>
                                    </div>
                            </div>
                        </div>
                        </ItemTemplate>
                        <FooterTemplate>
                            <asp:Panel ID="Panel1" runat="server" CssClass="onsellShow clearfix" Visible='<%#RepGoodList.Items.Count == 0%>'><div class="textArea">
                            <div id="nogoods" class="haveborder"><dl><dt>没有查询到商品！可能由于以下原因造成：</dt><dd>您店铺中此类目下暂时没有商品处于出售中！</dd><dd>您还没有在淘宝网上开店！</dd></dl></div></asp:Panel>
                        </FooterTemplate>
                    </asp:Repeater><asp:HiddenField ID="HidSetgl" runat="server" /><asp:Button ID="BtnSetgl" runat="server" Text="" CssClass="hidden" />
                    <webdiyer:AspNetPager ID="goodListPgr" runat="server" CurrentPageButtonPosition="End" CustomInfoHTML="共%PageCount%页，当前为第%CurrentPageIndex%页" FirstPageText="首页" LastPageText="尾页" NextPageText="后页" onpagechanged="grpager_PageChanged" PageIndexBoxType="TextBox" PageSize="6" PrevPageText="前页" ShowCustomInfoSection="Left" ShowPageIndexBox="Never" SubmitButtonText="Go" TextAfterPageIndexBox="页" TextBeforePageIndexBox="转到" NumericButtonCount="4" CssClass="pagertext" Height="10px" Wrap="False" LayoutType="Div"></webdiyer:AspNetPager>
             </div>
        </div>
    </ContentTemplate>
    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="goodListPgr" EventName="PageChanged" />
        <asp:AsyncPostBackTrigger ControlID="RepGoodList" EventName="ItemCommand" />
        <asp:AsyncPostBackTrigger ControlID="BtnSetgl" EventName="Click" />
    </Triggers>
    </asp:UpdatePanel>
    </form>
</body>
</html>
